package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.example.config.RocketMQConfigProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author c3886
 */
@Slf4j
@RestController
@RequestMapping("/simple")
public class SimpleController {

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    @RequestMapping("/send")
    public String simpleSend() {
        rocketMQTemplate.convertAndSend("simple-send-topic", "simple-send-topic simple hello");
        return "ok";
    }
}
